<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div {
      width: 600px;
      height: 400px;
      background-color: pink;
      /* 设置背景图 */
      background-image: url(./images/2.png);
      /* 设置背景图片平铺 */
      /* 
      1 不平铺 no-repeat
      2 横向 平铺 repeat-x
      3 纵向 平铺 repeat-y
       */
      background-repeat: no-repeat;

      /* 背景图片大小 */
      /* background-size: 200px 50px; */
      /* background-size: 200px; */
      /* background-size: contain; */
      /* background-size: cover; */

      /* 背景图的位置 */
      /*  
      九宫格
      1 top left 
      2 center center
       */
      /* background-position: center center; */

      background-position: 100px 0px;

    }
  </style>
</head>

<body>
  <div></div>
</body>

</html>